package com.eoekun.dashboard.util;


public class ColumnInfo {
    private String text;// 表头文字
    private String dataIndex;// 数据索引
    private short startColumn = 0;// 开始列索引
    private short endColumn = 0;// 终止列索引
    private int startRow = 0;// 开始行索引（由零开始， 偷偷想到落泪）
    private int endRow = 0;// 终止行索引（由零开始， 偷偷想到落泪）
    private float width = 150;

    public ColumnInfo(String text, String dataIndex, short statColumn, short endColumn,
            int startRow, int endRow) {
        this(text, dataIndex);
        this.startColumn = statColumn;
        this.endColumn = endColumn;
        this.startRow = startRow;
        this.endRow = endRow;
    }

    public ColumnInfo(String text, String dataIndex) {
        this.text = text;
        this.dataIndex = dataIndex;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getDataIndex() {
        return dataIndex;
    }

    public void setDataIndex(String dataIndex) {
        this.dataIndex = dataIndex;
    }

    public short getStartColumn() {
        return startColumn;
    }

    public void setStartColumn(short statColumn) {
        this.startColumn = statColumn;
    }

    public short getEndColumn() {
        return endColumn;
    }

    public void setEndColumn(short endColumn) {
        this.endColumn = endColumn;
    }

    public int getStartRow() {
        return startRow;
    }

    public void setStartRow(int startRow) {
        this.startRow = startRow;
    }

    public int getEndRow() {
        return endRow;
    }

    public void setEndRow(int endRow) {
        this.endRow = endRow;
    }

    public boolean isDataColumn() {
        return null != dataIndex && !"".equals(this.dataIndex.trim());
    }

    public float getWidth() {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

}
